#include <stdio.h>

int main(){
    int n;
    
    scanf("%d",&n);
    int time[n];
    for (int i=0;i<n;i++){
        scanf("%d",&time[i]);
        
    }
    int number[n];
    for (int i=0;i<n;i++){number[i]=i+1;}


    int flag = 0;
    int temp;
    for (int i=0;i<n;i++){
        for (int j=0;j<n-1;j++){
            if (time[j]>time[j+1]){
                temp = time[j];
                time[j] = time[j+1];
                time[j+1] = temp;
                temp = number[j];
                number[j] = number[j+1];
                number[j+1] = temp;

                flag = 1;
            }
        }
        if (flag==0){break;}
        flag=0;
        
    }
    int timesum=0;
    for (int i=0;i<n;i++){
        printf("%d",number[i]);
        if (i!=n-1){printf(" ");}
    }
    printf("\n");
    
    for (int i=0;i<n;i++){
        for (int j=0;j<=i;j++){
            timesum +=time[j];
        }
    }
    double average=(double)timesum/(double)n;
    printf("%.2f\n",average);
    return 0;
}